package family.yaongteam.connectlines;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

public class PaperView extends View {

	PaperManager paperManager = new PaperManager(this);
			
	public PaperView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	public PaperView(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public PaperView(Context context) {
		super(context);
	}

	public PaperManager getPaperManager() {
		return paperManager;
	}
	
	public void onDraw(Canvas canvas) {
		paperManager.draw(canvas);
	}
		
	@Override
	public boolean onTouchEvent(MotionEvent event) {
		
		if(paperManager.touch(event)) return true;
		
		return super.onTouchEvent(event);
	}
}
